<template>
	<view class="transferhome">
		<view class="f15 px15 mt15 withdraw">
			<view>
				<view class="f22 fwb">请输入邀请码激活账户</view>
				<view class="enternumber px15 py15 por por mt30 flex">
					<input class="flex-1"  type="text" placeholder="请输入邀请码"  v-model="vcode">
				</view>
			</view>
			<view class="white flex-text f16 h44 lh1 btmbtn mb20" @click="nextStep">下一步</view>
		</view>
	</view>
</template>

<script>
	import { mapState, mapActions } from 'vuex';
	export default {
		data() {
			return {
				vcode:''
			}
		},
		computed: {
			rule() {
				return [
					{ name: 'telphone', checkType: 'phone', checkRule: '', errorMsg: '请输入邀请码' },
				]
			}
		},
		onLoad(options) {
		
		},
		methods:{
			nextStep(){
				this.pushPage('/pages/Home/setPassword')
			},
			submit:async function(e){
				let that = this
				let param = {
					symbol:'USDT',
					type:that.cointype,
					mobile :that.otherphone,
					number:that.transnumber,
					payPwd:that.$md5(e)
				}
				let headerUUid = that.randomString(Math.ceil(Math.random()*10))
				let validData =that.addQueryString(Object.assign({},param))
				validData+= '&secretKey=YLtwNzGIGq3EKFev'
				param.sign = that.$md5(validData)
				await that.$http.post('exchange.transfer', param, {isAuth:true,isId:true, header:{phoneUuid:headerUUid}, tipConfig: { isLoading: false } }).then(data=>{
					that.navigatePage('/pages/exchange/success?type=1', 'slide-in-right')
				}).catch(err => {
					// that.otherphone = ''
					// that.transnumber = ''
					that.$refs.payword.close()
					that.payShow = false
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.transferhome{
		padding-top:120rpx;
		.sgrey{
			color: #828282;
		}
		.psdtip{
			line-height: 1.75;
		}
		.enternumber{
			background-color: #F5F6F7;
			color: #000;
			border-radius: 8rpx;
		}
		.btmbtn{
			margin-top:100rpx;
			background-color: #308AE4;
			border-radius: 14rpx;
		}
	}
</style>

